<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>elementUI Table组件封装 | 伊水河的博客</title>
    <meta name="generator" content="VuePress 1.7.1">
    <link rel="icon" href="/logo.png">
    <meta name="description" content="SO FAR SO GOOD">
    <meta name="twitter:title" content="elementUI Table组件封装">
    <meta name="twitter:description" content="">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:url" content="https://yihe.cool/guide/elementUITable.html">
    <meta property="og:type" content="article">
    <meta property="og:title" content="elementUI Table组件封装">
    <meta property="og:description" content="">
    <meta property="og:url" content="https://yihe.cool/guide/elementUITable.html">
    <meta property="article:author" content="伊水河">
    <meta itemprop="name" content="elementUI Table组件封装">
    <meta itemprop="description" content="">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/assets/css/0.styles.152c4062.css" as="style"><link rel="preload" href="/assets/js/app.2d22f3f9.js" as="script"><link rel="preload" href="/assets/js/3.6721f6a0.js" as="script"><link rel="preload" href="/assets/js/1.546ea5a7.js" as="script"><link rel="preload" href="/assets/js/14.2ea90c77.js" as="script"><link rel="prefetch" href="/assets/js/10.b827ae65.js"><link rel="prefetch" href="/assets/js/11.5e38b612.js"><link rel="prefetch" href="/assets/js/12.3f3699b0.js"><link rel="prefetch" href="/assets/js/13.7d83bc51.js"><link rel="prefetch" href="/assets/js/15.7df6d74c.js"><link rel="prefetch" href="/assets/js/16.33c1bac8.js"><link rel="prefetch" href="/assets/js/17.1aef86d1.js"><link rel="prefetch" href="/assets/js/18.b74cd2bd.js"><link rel="prefetch" href="/assets/js/19.73f82cea.js"><link rel="prefetch" href="/assets/js/20.6354096e.js"><link rel="prefetch" href="/assets/js/21.fd87273b.js"><link rel="prefetch" href="/assets/js/22.f90ee83e.js"><link rel="prefetch" href="/assets/js/23.e5f4f0a1.js"><link rel="prefetch" href="/assets/js/24.239130eb.js"><link rel="prefetch" href="/assets/js/25.db493ad9.js"><link rel="prefetch" href="/assets/js/26.26f3df98.js"><link rel="prefetch" href="/assets/js/27.d55bc04b.js"><link rel="prefetch" href="/assets/js/28.ac3a437a.js"><link rel="prefetch" href="/assets/js/29.9abce28f.js"><link rel="prefetch" href="/assets/js/30.ea843119.js"><link rel="prefetch" href="/assets/js/31.30a083bf.js"><link rel="prefetch" href="/assets/js/32.5f0b6b12.js"><link rel="prefetch" href="/assets/js/33.11456c83.js"><link rel="prefetch" href="/assets/js/34.e9ede601.js"><link rel="prefetch" href="/assets/js/35.17e5bb78.js"><link rel="prefetch" href="/assets/js/36.2f441457.js"><link rel="prefetch" href="/assets/js/37.e9fa7538.js"><link rel="prefetch" href="/assets/js/38.6bd1c237.js"><link rel="prefetch" href="/assets/js/39.8b0b956e.js"><link rel="prefetch" href="/assets/js/4.3ad057db.js"><link rel="prefetch" href="/assets/js/40.89ef1936.js"><link rel="prefetch" href="/assets/js/41.48d0560d.js"><link rel="prefetch" href="/assets/js/42.f804c44f.js"><link rel="prefetch" href="/assets/js/43.9dc6d003.js"><link rel="prefetch" href="/assets/js/44.3033d12c.js"><link rel="prefetch" href="/assets/js/45.60834ce1.js"><link rel="prefetch" href="/assets/js/46.c7eaf70d.js"><link rel="prefetch" href="/assets/js/47.a618490c.js"><link rel="prefetch" href="/assets/js/48.39a68335.js"><link rel="prefetch" href="/assets/js/49.1fa3bd55.js"><link rel="prefetch" href="/assets/js/5.4b2144a0.js"><link rel="prefetch" href="/assets/js/50.0ad5db28.js"><link rel="prefetch" href="/assets/js/51.843c519b.js"><link rel="prefetch" href="/assets/js/52.47d63846.js"><link rel="prefetch" href="/assets/js/53.5284b79d.js"><link rel="prefetch" href="/assets/js/54.b10b8ac1.js"><link rel="prefetch" href="/assets/js/55.3780915d.js"><link rel="prefetch" href="/assets/js/56.4a811b5c.js"><link rel="prefetch" href="/assets/js/57.228652ee.js"><link rel="prefetch" href="/assets/js/58.ef55d2ec.js"><link rel="prefetch" href="/assets/js/59.cbb81185.js"><link rel="prefetch" href="/assets/js/6.3dafc094.js"><link rel="prefetch" href="/assets/js/60.5257b363.js"><link rel="prefetch" href="/assets/js/61.03db625c.js"><link rel="prefetch" href="/assets/js/62.5982e690.js"><link rel="prefetch" href="/assets/js/63.0eccb44b.js"><link rel="prefetch" href="/assets/js/64.d92985de.js"><link rel="prefetch" href="/assets/js/65.4fd6aed1.js"><link rel="prefetch" href="/assets/js/66.acaf73d6.js"><link rel="prefetch" href="/assets/js/67.6db75c01.js"><link rel="prefetch" href="/assets/js/68.1dce863f.js"><link rel="prefetch" href="/assets/js/69.4222a30b.js"><link rel="prefetch" href="/assets/js/7.be8adaa3.js"><link rel="prefetch" href="/assets/js/8.3121f1c6.js"><link rel="prefetch" href="/assets/js/9.03dc3458.js">
    <link rel="stylesheet" href="/assets/css/0.styles.152c4062.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-2d5f533b><div data-v-2d5f533b><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-2d5f533b data-v-2d5f533b><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-64685f0e data-v-2d5f533b data-v-2d5f533b><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>伊水河的博客</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>伊水河</span>
            
          <span data-v-64685f0e>2020 - </span>
          2021
        </a></span></div></div> <div class="hide" data-v-2d5f533b><header class="navbar" data-v-2d5f533b><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">伊水河的博客</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/categories/前端/" class="nav-link"><i class="iconfont reco-blog"></i>
  前端
</a></div><div class="nav-item"><a href="/categories/leetcode/" class="nav-link"><i class="iconfont reco-coding"></i>
  力扣
</a></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/note/" class="nav-link"><i class="iconfont reco-suggestion"></i>
  笔记
</a></div><div class="nav-item"><a href="/todo/" class="nav-link"><i class="iconfont reco-document"></i>
  TODO
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-account"></i>
      关于
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://juejin.cn/user/571401777456621" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-juejin"></i>
  掘金
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://yishuihe.gitee.io" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  码云
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://github.com/lixiang89" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  github
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://node.kg.qq.com/personal?uid=659d9d802d253e8231" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont "></i>
  全民K歌
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-2d5f533b></div> <aside class="sidebar" data-v-2d5f533b><div class="personal-info-wrapper" data-v-ca798c94 data-v-2d5f533b><img src="/b.jpg" alt="author-avatar" class="personal-img" data-v-ca798c94> <h3 class="name" data-v-ca798c94>
    伊水河
  </h3> <div class="num" data-v-ca798c94><div data-v-ca798c94><h3 data-v-ca798c94>51</h3> <h6 data-v-ca798c94>文章</h6></div> <div data-v-ca798c94><h3 data-v-ca798c94>13</h3> <h6 data-v-ca798c94>标签</h6></div></div> <hr data-v-ca798c94></div> <nav class="nav-links"><div class="nav-item"><a href="/categories/前端/" class="nav-link"><i class="iconfont reco-blog"></i>
  前端
</a></div><div class="nav-item"><a href="/categories/leetcode/" class="nav-link"><i class="iconfont reco-coding"></i>
  力扣
</a></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/note/" class="nav-link"><i class="iconfont reco-suggestion"></i>
  笔记
</a></div><div class="nav-item"><a href="/todo/" class="nav-link"><i class="iconfont reco-document"></i>
  TODO
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-account"></i>
      关于
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://juejin.cn/user/571401777456621" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-juejin"></i>
  掘金
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://yishuihe.gitee.io" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  码云
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://github.com/lixiang89" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  github
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://node.kg.qq.com/personal?uid=659d9d802d253e8231" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont "></i>
  全民K歌
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-64685f0e data-v-2d5f533b><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>elementUI Table组件封装</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>伊水河</span>
            
          <span data-v-64685f0e>2020 - </span>
          2021
        </a></span></div></div> <div data-v-2d5f533b><main class="page"><div class="page-title" style="display:none;"><h1 class="title">elementUI Table组件封装</h1> <div data-v-3b7f5bdf><i class="iconfont reco-account" data-v-3b7f5bdf><span data-v-3b7f5bdf>伊水河</span></i> <!----> <i class="iconfont reco-eye" data-v-3b7f5bdf><span id="/guide/elementUITable.html" data-flag-title="Your Article Title" class="leancloud-visitors" data-v-3b7f5bdf><a class="leancloud-visitors-count" style="font-size:.9rem;font-weight:normal;color:#999;"></a></span></i> <!----></div></div> <div class="theme-reco-content content__default" style="display:none;"><h2 id="前言"><a href="#前言" class="header-anchor">#</a> 前言</h2> <p>elementUI的table组件，当数据较多时，每次都要写大量的HTML，而我个人更喜欢写js，同时也可以更好的应对列项增减变化的情况，所以呢就封装了。使用只需传参即可，类antd的table用法吧，传columns。</p> <h2 id="开始"><a href="#开始" class="header-anchor">#</a> 开始</h2> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>yshTable<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">v-if</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>$scopedSlots.tableTitle<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>yshTableTitle<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>slot</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>tableTitle<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>slot</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>el-table</span>
            <span class="token attr-name">v-loading</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>loading<span class="token punctuation">&quot;</span></span>
            <span class="token attr-name">header-row-class-name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>yshTableHeaderRow<span class="token punctuation">&quot;</span></span>
            <span class="token attr-name">header-cell-class-name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>yshTableHeaderCell<span class="token punctuation">&quot;</span></span>
            <span class="token attr-name">@sort-change</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>sortChange<span class="token punctuation">&quot;</span></span>
            <span class="token attr-name">@filter-change</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>filterChange<span class="token punctuation">&quot;</span></span>
            <span class="token attr-name">v-bind</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>$attrs<span class="token punctuation">&quot;</span></span>
            <span class="token attr-name">v-on</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>$listeners<span class="token punctuation">&quot;</span></span>
        <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span> <span class="token attr-name">#append</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>slot</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>append<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>slot</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span> <span class="token attr-name">#empty</span><span class="token punctuation">&gt;</span></span>
                // 这里可以放置一个公共的无数据时的展示，也可以用slot
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>slot</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>empty<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>slot</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>el-table-column</span>
                <span class="token attr-name">v-for</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column in columns<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.prop<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:column-key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.columnKey||column.prop<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.type<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:index</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.index<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:prop</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.prop<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:label</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.label<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:formatter</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>handleFormat(column)<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.align<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:header-align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.headerAlign||column.align<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.width<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:min-width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.minWidth<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:min-height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.minHeight<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:sortable</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.sortable<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:filters</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.filters<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:fixed</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.fixed<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:class-name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>yshTableColumnCel `${column.className||<span class="token punctuation">'</span><span class="token punctuation">'</span>}`<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:render-header</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.renderHeader<span class="token punctuation">&quot;</span></span>
                <span class="token attr-name">:show-overflow-tooltip</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.showOverflowTooltip<span class="token punctuation">&quot;</span></span>
            <span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span> <span class="token attr-name">v-if</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>$scopedSlots[`${column.prop}_header`]<span class="token punctuation">&quot;</span></span> <span class="token attr-name">#header</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>scope<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>slot</span> <span class="token attr-name">:name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>`${column.prop}_header`<span class="token punctuation">&quot;</span></span> <span class="token attr-name">:scope</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>scope<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>slot</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span> <span class="token attr-name">v-if</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>$scopedSlots[column.prop]<span class="token punctuation">&quot;</span></span> <span class="token attr-name">#default</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>scope<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>slot</span> <span class="token attr-name">:name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>column.prop<span class="token punctuation">&quot;</span></span> <span class="token attr-name">:scope</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>scope<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>slot</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>el-talbe-column</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">v-if</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pageTotal<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>yshTablePagination<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>el-pagination</span>
                    <span class="token attr-name">background</span>
                    <span class="token attr-name">:page-sizes</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>sizes<span class="token punctuation">&quot;</span></span>
                    <span class="token attr-name">:page-size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>size<span class="token punctuation">&quot;</span></span>
                    <span class="token attr-name">:total</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>totla<span class="token punctuation">&quot;</span></span>
                    <span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>slot,-&gt;,prev,pager,next,sizes,jumper<span class="token punctuation">&quot;</span></span>
                    <span class="token attr-name">:current-page</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pageNum<span class="token punctuation">&quot;</span></span>
                    <span class="token attr-name">@size-change</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pageSizeChange<span class="token punctuation">&quot;</span></span>
                    <span class="token attr-name">@current-change</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>currentPageChange<span class="token punctuation">&quot;</span></span>
                <span class="token punctuation">&gt;</span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span><span class="token punctuation">&gt;</span></span>
                        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>slot<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">&gt;</span></span>共{{pageTotal}}条记录<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span>
                            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">&gt;</span></span>第{{pageNum}}/{{totalPages||totalPage}}页<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span>
                        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>el-pagination</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>el-table</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span>numberFormat<span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'./utils'</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span>Component <span class="token punctuation">,</span>Emit <span class="token punctuation">,</span>Prop <span class="token punctuation">,</span>PropSync <span class="token punctuation">,</span> Vue <span class="token punctuation">,</span>Watch<span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'vue-property-decorator'</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span>Column<span class="token punctuation">,</span>Formatter<span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'./interface'</span>
@<span class="token function">Component</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    name<span class="token operator">:</span><span class="token string">'YshTable'</span><span class="token punctuation">,</span>
    inheritAttrs<span class="token operator">:</span><span class="token boolean">false</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">class</span> <span class="token class-name">extends</span> Vue<span class="token punctuation">{</span>
    @<span class="token function">Prop</span><span class="token punctuation">(</span>Array<span class="token punctuation">)</span> <span class="token keyword">private</span> columns<span class="token operator">!</span><span class="token operator">:</span> Column<span class="token punctuation">[</span><span class="token punctuation">]</span>
    @<span class="token function">Prop</span><span class="token punctuation">(</span>Boolean<span class="token punctuation">)</span> <span class="token keyword">private</span> loading<span class="token operator">!</span><span class="token operator">:</span> boolean

    @<span class="token function">Prop</span><span class="token punctuation">(</span><span class="token punctuation">{</span>type<span class="token operator">:</span>Number<span class="token punctuation">,</span><span class="token keyword">default</span><span class="token operator">:</span><span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token keyword">private</span> pageSize<span class="token operator">!</span><span class="token operator">:</span> number
    @<span class="token function">Prop</span><span class="token punctuation">(</span>Number<span class="token punctuation">)</span> <span class="token keyword">private</span> totalPages<span class="token operator">!</span><span class="token operator">:</span> number

    @<span class="token function">PropSync</span><span class="token punctuation">(</span><span class="token string">'pageSizes'</span><span class="token punctuation">,</span><span class="token punctuation">{</span>type<span class="token operator">:</span>Array<span class="token punctuation">,</span><span class="token function-variable function">defult</span><span class="token operator">:</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">,</span><span class="token number">20</span><span class="token punctuation">,</span><span class="token number">30</span><span class="token punctuation">]</span><span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token keyword">private</span> sizes<span class="token operator">!</span><span class="token operator">:</span> number<span class="token punctuation">[</span><span class="token punctuation">]</span>
    @<span class="token function">PropSync</span><span class="token punctuation">(</span><span class="token string">'pageTotal'</span><span class="token punctuation">,</span>Number<span class="token punctuation">)</span> <span class="token keyword">private</span> total<span class="token operator">!</span><span class="token operator">:</span> number
    @<span class="token function">PropSync</span><span class="token punctuation">(</span><span class="token string">'num'</span><span class="token punctuation">,</span><span class="token punctuation">{</span>type<span class="token operator">:</span>Number<span class="token punctuation">,</span>defult<span class="token operator">:</span><span class="token number">1</span><span class="token punctuation">)</span> <span class="token keyword">private</span> pageNum<span class="token operator">!</span><span class="token operator">:</span> number

    <span class="token keyword">private</span> size<span class="token operator">:</span>number<span class="token operator">=</span><span class="token number">10</span>

    <span class="token keyword">private</span> params<span class="token operator">:</span>Param<span class="token operator">=</span><span class="token punctuation">{</span>
        pageNum<span class="token operator">:</span><span class="token number">1</span><span class="token punctuation">,</span>
        pageSize<span class="token operator">:</span><span class="token keyword">this</span><span class="token punctuation">.</span>size<span class="token punctuation">,</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">private</span> <span class="token keyword">get</span> <span class="token function">totalPage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">return</span> Math<span class="token punctuation">.</span><span class="token function">ceil</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>total<span class="token operator">/</span><span class="token keyword">this</span><span class="token punctuation">.</span>size<span class="token punctuation">)</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">private</span> <span class="token function">handleFormat</span><span class="token punctuation">(</span><span class="token parameter">column<span class="token operator">:</span>Column</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">const</span> <span class="token punctuation">{</span>formatter<span class="token punctuation">,</span>formatNumber<span class="token punctuation">}</span><span class="token operator">=</span>column
        <span class="token keyword">if</span><span class="token punctuation">(</span>formatter<span class="token punctuation">)</span><span class="token punctuation">{</span>
            <span class="token keyword">return</span> formatter
        <span class="token punctuation">}</span><span class="token keyword">else</span><span class="token punctuation">{</span>
            <span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">r<span class="token punctuation">,</span>c<span class="token punctuation">,</span>v<span class="token punctuation">,</span>i</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
                <span class="token keyword">if</span><span class="token punctuation">(</span>formatNumber<span class="token punctuation">)</span><span class="token punctuation">{</span>
                    <span class="token keyword">return</span> <span class="token function">numberFormat</span><span class="token punctuation">(</span>v<span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">)</span>
                <span class="token punctuation">}</span><span class="token keyword">else</span><span class="token punctuation">{</span>
                    <span class="token keyword">return</span> <span class="token punctuation">[</span><span class="token keyword">undefined</span><span class="token punctuation">,</span><span class="token keyword">null</span><span class="token punctuation">,</span><span class="token string">''</span><span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token function">includes</span><span class="token punctuation">(</span>v<span class="token punctuation">)</span><span class="token operator">?</span><span class="token string">'-'</span><span class="token operator">:</span>v
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token keyword">as</span> Formatter
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>

    @<span class="token function">Watch</span><span class="token punctuation">(</span><span class="token string">'pageSize'</span><span class="token punctuation">,</span><span class="token punctuation">{</span>immediate<span class="token operator">:</span><span class="token boolean">true</span><span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token keyword">private</span> <span class="token function">pageSizeChanged</span><span class="token punctuation">(</span><span class="token parameter">newValue<span class="token operator">:</span>number<span class="token punctuation">,</span>oldValue<span class="token operator">:</span>number</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>size<span class="token operator">=</span>newValue
    <span class="token punctuation">}</span>

    @<span class="token function">Emit</span><span class="token punctuation">(</span><span class="token string">'onChange'</span><span class="token punctuation">)</span>
    <span class="token keyword">private</span> <span class="token function">sortChange</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span>prop<span class="token punctuation">,</span>order<span class="token punctuation">}</span><span class="token operator">:</span><span class="token punctuation">{</span>prop<span class="token operator">:</span>string<span class="token punctuation">,</span>order<span class="token operator">:</span>string<span class="token punctuation">}</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        Object<span class="token punctuation">.</span><span class="token function">assign</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>params<span class="token punctuation">,</span><span class="token punctuation">{</span>
            sortFiled<span class="token operator">:</span>prop<span class="token punctuation">,</span>
            sortValue<span class="token operator">:</span>order<span class="token punctuation">,</span>
            <span class="token keyword">from</span><span class="token operator">:</span><span class="token string">'sortChange'</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>params
    <span class="token punctuation">}</span>

    @<span class="token function">Emit</span><span class="token punctuation">(</span><span class="token string">'onChange'</span><span class="token punctuation">)</span>
    <span class="token keyword">private</span> <span class="token function">filterChange</span><span class="token punctuation">(</span><span class="token parameter">filters<span class="token operator">:</span>any</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">const</span> temp<span class="token operator">=</span>Object<span class="token punctuation">.</span><span class="token function">entries</span><span class="token punctuation">(</span>filters<span class="token punctuation">)</span>
        <span class="token keyword">const</span> <span class="token punctuation">[</span>filterFiled<span class="token punctuation">,</span>filterValue<span class="token punctuation">]</span><span class="token operator">=</span>temp<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span>
        Object<span class="token punctuation">.</span><span class="token function">assign</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>params<span class="token punctuation">,</span><span class="token punctuation">{</span>
            filterFiled<span class="token punctuation">,</span>
            filterValue<span class="token punctuation">,</span>
            <span class="token keyword">from</span><span class="token operator">:</span><span class="token string">'filterChange'</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>params
    <span class="token punctuation">}</span>

    @<span class="token function">Emit</span><span class="token punctuation">(</span><span class="token string">'onChange'</span><span class="token punctuation">)</span>
    <span class="token keyword">private</span> <span class="token function">currentPageChange</span><span class="token punctuation">(</span><span class="token parameter">pageNum<span class="token operator">:</span>number</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>pageNum<span class="token operator">=</span>pageNum
        Object<span class="token punctuation">.</span><span class="token function">assign</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>params<span class="token punctuation">,</span><span class="token punctuation">{</span>
            pageNum<span class="token punctuation">,</span>
            pageSize<span class="token operator">:</span><span class="token keyword">this</span><span class="token punctuation">.</span>size<span class="token punctuation">,</span>
            <span class="token keyword">from</span><span class="token operator">:</span><span class="token string">'currentPageChange'</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">private</span> <span class="token function">pageSizeChange</span><span class="token punctuation">(</span><span class="token parameter">pageSize<span class="token operator">:</span>number</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>size<span class="token operator">=</span>pageSize
        Object<span class="token punctuation">.</span><span class="token function">assign</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>params<span class="token punctuation">,</span><span class="token punctuation">{</span>
            pageSize<span class="token punctuation">,</span>
            <span class="token keyword">from</span><span class="token operator">:</span><span class="token string">'pageSizeChange'</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>pageNum<span class="token operator">&gt;</span><span class="token keyword">this</span><span class="token punctuation">.</span>totalPage<span class="token punctuation">)</span> <span class="token keyword">return</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$emit</span><span class="token punctuation">(</span><span class="token string">'onChange'</span><span class="token punctuation">,</span><span class="token keyword">this</span><span class="token punctuation">.</span>params<span class="token punctuation">)</span>
    <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
</code></pre></div></div> <footer class="page-edit" style="display:none;"><!----> <!----></footer> <!----> <!----> <!----></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div><APlayer audio="" fixed="true" theme="#b7daff" loop="loop" order="random" preload="auto" volume="0.7" mutex="true" lrc-type="3" list-folded="true" list-max-height="250" storage-name="vuepress-plugin-meting" id="aplayer-fixed"></APlayer></div></div>
    <script src="/assets/js/app.2d22f3f9.js" defer></script><script src="/assets/js/3.6721f6a0.js" defer></script><script src="/assets/js/1.546ea5a7.js" defer></script><script src="/assets/js/14.2ea90c77.js" defer></script>
  </body>
</html>
